<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>
 Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
	
		parent.document.title="xtree.js Overview";
	
}
</script>
</head>
<body bgcolor="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> 	<font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<center>
	
	   <h2>xtree.js</h2>
	
</center>

	


<h4>Summary</h4>
<p>
	
		No overview generated for 'xtree.js'<BR/><BR/>
	
</p>

<hr>


    <table border="1" cellpadding="3" cellspacing="0" width="100%">
    <tr bgcolor="#CCCCFF" class="TableHeadingColor">
    <td colspan=2><font size="+2">
    
        <b>Class Summary</b>
    
    </font></td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="treeItem.html">treeItem</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="xtreeItem.html">xtreeItem</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    </table>
    <hr/> 


<!-- ========== METHOD SUMMARY =========== -->

	<a name="method_summary"><!-- --></a>
	<table border="1" cellpadding="3" cellspacing="0" width="100%">
		<tr bgcolor="#CCCCFF" class="TableHeadingColor">
			<td colspan=2>
				<font size="+2">
					<b>Method Summary</b>
				</font>
			</td>
		</tr>
	
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!delCookie">delCookie</a></b>(name)
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;<a href="Object.html">Object</a></code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!getCookie">getCookie</a></b>(name)
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!preLoadImage">preLoadImage</a></b>()
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!setCookie">setCookie</a></b>(name,value)
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
	
	</table>
    <p>

<!-- ========== END METHOD SUMMARY =========== -->


        <pre class="sourceview"><span class="comment">//** Powered by Fason</span>
<span class="comment">//** Email: fason_pfx<span class="attrib">@hotmail</span>.com</span>

var icon={
	root	:<span class="literal">'img/xtree/root.gif'</span>,
	open	:<span class="literal">'img/xtree/open.png'</span>,
	close	:<span class="literal">'img/xtree/close.png'</span>,
	file	:<span class="literal">'img/xtree/file.png'</span>,
	Rplus	:<span class="literal">'img/xtree/Rplus.gif'</span>,
	Rminus	:<span class="literal">'img/xtree/Rminus.gif'</span>,
	join	:<span class="literal">'img/xtree/T.gif'</span>,
	joinbottom:<span class="literal">'img/xtree/L.gif'</span>,
	plus	:<span class="literal">'img/xtree/Tplus.gif'</span>,
	plusbottom:<span class="literal">'img/xtree/Lplus.gif'</span>,
	minus	:<span class="literal">'img/xtree/Tminus.gif'</span>,
	minusbottom:<span class="literal">'img/xtree/Lminus.gif'</span>,
	blank	:<span class="literal">'img/xtree/blank.gif'</span>,
	line	:<span class="literal">'img/xtree/I.gif'</span>
};
var Global={
	id:0,
	getId:<span class="reserved">function</span>(){<span class="reserved">return</span> <span class="reserved">this</span>.id++;},
	all:[],
	selectedItem:null,
	defaultText:<span class="literal">"treeItem"</span>,
	defaultAction:<span class="literal">"javascript:void(0)"</span>,
	defaultTarget:<span class="literal">"_blank"</span>
}
<span class="reserved">function</span> preLoadImage(){
	<span class="reserved">for</span>(i in icon){
		var tem=icon[i];
		icon[i]=new Image()
		icon[i].src=tem
	}
};preLoadImage();

<span class="reserved">function</span> treeItem(text,action,target,title,Icon)
{
	<span class="reserved">this</span>.id=Global.getId();
	<span class="reserved">this</span>.level=0;
	<span class="reserved">this</span>.text=text?text:Global.defaultText;
	<span class="reserved">this</span>.action=action?action:Global.defaultAction;
	<span class="reserved">this</span>.target=target?target:Global.defaultTarget;
	<span class="reserved">this</span>.title=title?title:<span class="reserved">this</span>.text;
	<span class="reserved">this</span>.isLast=true;
	<span class="reserved">this</span>.childNodes=new Array();
	<span class="reserved">this</span>.indent=new Array();
	<span class="reserved">this</span>.parent=null;
	var c =0; 
	<span class="reserved">if</span>(getCookie(<span class="literal">"item"</span>+<span class="reserved">this</span>.id) != null) c = getCookie(<span class="literal">"item"</span>+<span class="reserved">this</span>.id);
	<span class="reserved">this</span>.open=parseInt(c);
	<span class="reserved">this</span>.load=false;
	<span class="reserved">this</span>.setuped=false;
	<span class="reserved">this</span>.JsItem=null;
	<span class="reserved">this</span>.container=document.createElement(<span class="literal">"div"</span>);
	<span class="reserved">this</span>.icon=Icon;
	Global.all[Global.all.length]=<span class="reserved">this</span>;
}

treeItem.<span class="reserved">prototype</span>.toString = <span class="reserved">function</span>()
{
	var o = <span class="reserved">this</span>;
	var oItem = document.createElement(<span class="literal">"div"</span>);
	oItem.id = <span class="literal">"treeItem"</span>+<span class="reserved">this</span>.id
	oItem.className = <span class="literal">"treeItem"</span>;
	oItem.noWrap = true;
	oItem.onselectstart = <span class="reserved">function</span>(){ <span class="reserved">return</span> false;}
	oItem.oncontextmenu = <span class="reserved">function</span>(){ <span class="reserved">return</span> false;}
	<span class="reserved">this</span>.JsItem = oItem;
	<span class="reserved">this</span>.drawIndents();
	var iIcon = document.createElement(<span class="literal">"img"</span>);
	iIcon.align = <span class="literal">"absmiddle"</span>;
	iIcon.src = <span class="reserved">this</span>.childNodes.length&gt;0?(<span class="reserved">this</span>.open?(<span class="reserved">this</span>.level&gt;0?(<span class="reserved">this</span>.isLast?icon.minusbottom.src:icon.minus.src):icon.Rminus.src):(<span class="reserved">this</span>.level&gt;0?(<span class="reserved">this</span>.isLast?icon.plusbottom.src:icon.plus.src):icon.Rplus.src)):(<span class="reserved">this</span>.level&gt;0?(<span class="reserved">this</span>.isLast?icon.joinbottom.src:icon.join.src):icon.blank.src);
	iIcon.id = <span class="literal">"treeItem-icon-handle-"</span> + <span class="reserved">this</span>.id;
	iIcon.onclick = <span class="reserved">function</span>(){ o.toggle();};
	oItem.appendChild(iIcon);
	var iIcon = document.createElement(<span class="literal">"img"</span>);
	iIcon.align = <span class="literal">"absmiddle"</span>;
	iIcon.src = <span class="reserved">this</span>.icon?<span class="reserved">this</span>.icon:(<span class="reserved">this</span>.childNodes.length&gt;0?(<span class="reserved">this</span>.open?icon.open.src:icon.close.src):icon.file.src);
	iIcon.id = <span class="literal">"treeItem-icon-folder-"</span> + <span class="reserved">this</span>.id;
	iIcon.onclick = <span class="reserved">function</span>(){ o.select();};
	iIcon.ondblclick = <span class="reserved">function</span>(){ o.toggle();};
	oItem.appendChild(iIcon);
	var eText = document.createElement(<span class="literal">"span"</span>);
	var eA=document.createElement(<span class="literal">"a"</span>);
	eA.innerHTML = <span class="reserved">this</span>.text;
	eA.target = <span class="reserved">this</span>.target;
	eA.href = <span class="reserved">this</span>.action;
	eA.onkeydown = <span class="reserved">function</span>(e){ <span class="reserved">return</span> o.KeyDown(e);}
	<span class="reserved">if</span>(<span class="reserved">this</span>.action == Global.defaultAction) eA.onclick = <span class="reserved">function</span>(){ <span class="reserved">return</span> false;}
	eText.appendChild(eA);
	eText.id = <span class="literal">"treeItem-text-"</span> + <span class="reserved">this</span>.id;
	eText.className = <span class="literal">"treeItem-unselect"</span>
	eText.onclick = <span class="reserved">function</span>(){ o.select(1);};
	eText.title = <span class="reserved">this</span>.title;
	oItem.appendChild(eText);
	<span class="reserved">this</span>.container.id = <span class="literal">"treeItem-container-"</span>+<span class="reserved">this</span>.id;
	<span class="reserved">this</span>.container.style.display = <span class="reserved">this</span>.open?<span class="literal">""</span>:<span class="literal">"none"</span>;
	oItem.appendChild(<span class="reserved">this</span>.container);
	<span class="reserved">return</span> oItem;
}

treeItem.<span class="reserved">prototype</span>.root = <span class="reserved">function</span>()
{
	var p = <span class="reserved">this</span>;
	<span class="reserved">while</span>(p.parent)
		p = p.parent;
	<span class="reserved">return</span> p;
}

treeItem.<span class="reserved">prototype</span>.setText = <span class="reserved">function</span>(sText)
{
	<span class="reserved">if</span>(<span class="reserved">this</span>.root().setuped)
	{
		var oItem = document.getElementById(<span class="literal">"treeItem-text-"</span> + <span class="reserved">this</span>.id);
		var i=oItem.firstChild;
		i.innerHTML = sText;
	}
	<span class="reserved">this</span>.text = sText;
}

treeItem.<span class="reserved">prototype</span>.setIndent = <span class="reserved">function</span>(l,v)
{
	<span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.childNodes.length;i++)
	{
		<span class="reserved">this</span>.childNodes[i].indent[l] = v;
		<span class="reserved">this</span>.childNodes[i].setIndent(l,v);
	}
}

treeItem.<span class="reserved">prototype</span>.drawIndents = <span class="reserved">function</span>()
{
	var oItem = <span class="reserved">this</span>.JsItem;
	<span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.indent.length;i++){
		var iIcon = document.createElement(<span class="literal">"img"</span>);
		iIcon.align = <span class="literal">"absmiddle"</span>;
		iIcon.id = <span class="literal">"treeItem-icon-"</span> + <span class="reserved">this</span>.id + <span class="literal">"-"</span> + i;
		iIcon.src = <span class="reserved">this</span>.indent[i]?icon.blank.src:icon.line.src;
		oItem.appendChild(iIcon);
	}
}

treeItem.<span class="reserved">prototype</span>.add = <span class="reserved">function</span>(oItem)
{
	oItem.parent=<span class="reserved">this</span>;
	<span class="reserved">this</span>.childNodes[<span class="reserved">this</span>.childNodes.length]=oItem;
	oItem.level=<span class="reserved">this</span>.level+1;
	oItem.indent=<span class="reserved">this</span>.indent.concat();
	oItem.indent[oItem.indent.length]=<span class="reserved">this</span>.isLast;
	<span class="reserved">if</span>(<span class="reserved">this</span>.childNodes.length&gt;1){
		var o=<span class="reserved">this</span>.childNodes[<span class="reserved">this</span>.childNodes.length-2];
		o.isLast=false;
		o.setIndent(o.level,0);
		<span class="reserved">if</span>(<span class="reserved">this</span>.root().setuped)o.reload(1);
	}
	<span class="reserved">else</span> <span class="reserved">if</span>(<span class="reserved">this</span>.root().setuped)
		<span class="reserved">this</span>.reload(0);
	<span class="reserved">this</span>.container.appendChild(oItem.toString());
	<span class="reserved">this</span>.container.style.display=<span class="reserved">this</span>.open?<span class="literal">""</span>:<span class="literal">"none"</span>;
	<span class="reserved">return</span> oItem;
}

treeItem.<span class="reserved">prototype</span>.loadChildren = <span class="reserved">function</span>()
{
	<span class="comment">//do something</span>
}

treeItem.<span class="reserved">prototype</span>.remove = <span class="reserved">function</span>()
{
	var tmp = <span class="reserved">this</span>.getPreviousSibling();
	<span class="comment">//if(tmp){ tmp.select();}</span>
	<span class="reserved">this</span>.removeChildren();
	var p = <span class="reserved">this</span>.parent;
	<span class="reserved">if</span>(!p){ <span class="reserved">return</span> };
	<span class="reserved">if</span>(p.childNodes.length&gt;0){
		var o = p.childNodes[p.childNodes.length-1];
		o.isLast = true;
		o.setIndent(o.level,1);
		<span class="reserved">if</span>(o.root().setuped)o.reload(1);
	}
	<span class="reserved">else</span>
		p.reload();
}

treeItem.<span class="reserved">prototype</span>.removeChildren = <span class="reserved">function</span> ()
{
	<span class="reserved">if</span>(<span class="reserved">this</span> == Global.selectedItem){ Global.selectedItem = null;}
	<span class="reserved">for</span>(var i=<span class="reserved">this</span>.childNodes.length-1;i&gt;=0;i--)
		<span class="reserved">this</span>.childNodes[i].removeChildren();
	var o = <span class="reserved">this</span>;
	var p = <span class="reserved">this</span>.parent;
	<span class="reserved">if</span> (p) { p.childNodes = p.childNodes._remove(o);}
	Global.all[<span class="reserved">this</span>.id] = null
	var oItem = document.getElementById(<span class="literal">"treeItem"</span>+<span class="reserved">this</span>.id);
	<span class="reserved">if</span> (oItem) { oItem.parentNode.removeChild(oItem); }
}

treeItem.<span class="reserved">prototype</span>.reload = <span class="reserved">function</span>(flag)
{
	<span class="reserved">if</span> (flag){
		<span class="reserved">for</span>(var j=0;j&lt;<span class="reserved">this</span>.childNodes.length;j++){ <span class="reserved">this</span>.childNodes[j].reload(1);}
		<span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.indent.length;i++)
			document.getElementById(<span class="literal">"treeItem-icon-"</span> +<span class="reserved">this</span>.id+ <span class="literal">"-"</span>+i).src = <span class="reserved">this</span>.indent[i]?icon.blank.src:icon.line.src;
	}
	document.getElementById(<span class="literal">"treeItem-icon-handle-"</span> +<span class="reserved">this</span>.id).src = <span class="reserved">this</span>.childNodes.length&gt;0?(<span class="reserved">this</span>.open?(<span class="reserved">this</span>.level&gt;0?(<span class="reserved">this</span>.isLast?icon.minusbottom.src:icon.minus.src):icon.Rminus.src):(<span class="reserved">this</span>.level&gt;0?(<span class="reserved">this</span>.isLast?icon.plusbottom.src:icon.plus.src):icon.Rplus.src)):(<span class="reserved">this</span>.level&gt;0?(<span class="reserved">this</span>.isLast?icon.joinbottom.src:icon.join.src):icon.blank.src);
	<span class="reserved">if</span> (!<span class="reserved">this</span>.icon)
		document.getElementById(<span class="literal">"treeItem-icon-folder-"</span>+<span class="reserved">this</span>.id).src = <span class="reserved">this</span>.childNodes.length&gt;0?(<span class="reserved">this</span>.open?icon.open.src:icon.close.src):icon.file.src;
}

treeItem.<span class="reserved">prototype</span>.toggle = <span class="reserved">function</span>()
{
	<span class="reserved">if</span>(<span class="reserved">this</span>.childNodes.length&gt;0){
		<span class="reserved">if</span>(<span class="reserved">this</span>.open)
			<span class="reserved">this</span>.collapse();
		<span class="reserved">else</span>
			<span class="reserved">this</span>.expand();
	}
}

treeItem.<span class="reserved">prototype</span>.expand = <span class="reserved">function</span>()
{
	<span class="reserved">this</span>.open=1;
	setCookie(<span class="literal">"item"</span>+<span class="reserved">this</span>.id,1);
	<span class="reserved">if</span>(!<span class="reserved">this</span>.load){
		<span class="reserved">this</span>.load=true;
		<span class="reserved">this</span>.loadChildren();
		<span class="reserved">this</span>.reload(1);
	}
	<span class="reserved">else</span> 
		<span class="reserved">this</span>.reload(0);
	<span class="reserved">this</span>.container.style.display = <span class="literal">""</span>;
}

treeItem.<span class="reserved">prototype</span>.collapse = <span class="reserved">function</span>()
{
	<span class="reserved">this</span>.open=0;
	setCookie(<span class="literal">"item"</span>+<span class="reserved">this</span>.id,0);
	<span class="reserved">this</span>.container.style.display = <span class="literal">"none"</span>;
	<span class="reserved">this</span>.reload(0);
	<span class="reserved">this</span>.select(1);
}

treeItem.<span class="reserved">prototype</span>.expandAll = <span class="reserved">function</span>()
{
	<span class="reserved">if</span>(<span class="reserved">this</span>.childNodes.length&gt;0 &amp;&amp; !<span class="reserved">this</span>.open)<span class="reserved">this</span>.expand();
	<span class="reserved">this</span>.expandChildren();
}

treeItem.<span class="reserved">prototype</span>.collapseAll = <span class="reserved">function</span>()
{
	<span class="reserved">this</span>.collapseChildren();
	<span class="reserved">if</span>(<span class="reserved">this</span>.childNodes.length&gt;0 &amp;&amp; <span class="reserved">this</span>.open)<span class="reserved">this</span>.collapse();
}

treeItem.<span class="reserved">prototype</span>.expandChildren = <span class="reserved">function</span>()
{
	<span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.childNodes.length;i++)
	<span class="reserved">this</span>.childNodes[i].expandAll();
}

treeItem.<span class="reserved">prototype</span>.collapseChildren = <span class="reserved">function</span>()
{
	<span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.childNodes.length;i++)
	<span class="reserved">this</span>.childNodes[i].collapseAll()
}

treeItem.<span class="reserved">prototype</span>.openURL=<span class="reserved">function</span>()
{
	<span class="reserved">if</span>(<span class="reserved">this</span>.action!=Global.defaultAction){
		window.open(<span class="reserved">this</span>.action,<span class="reserved">this</span>.target);
	}
}

treeItem.<span class="reserved">prototype</span>.select=<span class="reserved">function</span>(o)
{
	<span class="reserved">if</span> (Global.selectedItem) Global.selectedItem.unselect();
	var oItem = document.getElementById(<span class="literal">"treeItem-text-"</span> + <span class="reserved">this</span>.id);
	oItem.className = <span class="literal">"treeItem-selected"</span>;
	oItem.firstChild.focus();
	Global.selectedItem = <span class="reserved">this</span>;
	<span class="reserved">if</span>(!o) <span class="reserved">this</span>.openURL();
}

treeItem.<span class="reserved">prototype</span>.unselect=<span class="reserved">function</span>()
{
	var oItem = document.getElementById(<span class="literal">"treeItem-text-"</span> + <span class="reserved">this</span>.id);
	oItem.className = <span class="literal">"treeItem-unselect"</span>;
	oItem.firstChild.blur();
	Global.selectedItem = null;
}

treeItem.<span class="reserved">prototype</span>.setup = <span class="reserved">function</span>(oTaget)
{
	var temp=<span class="reserved">this</span>.toString();
	oTaget.appendChild(temp);
	<span class="comment">//alert(temp.innerHTML);</span>
	<span class="reserved">this</span>.setuped = true;
	<span class="reserved">if</span>(<span class="reserved">this</span>.childNodes.length&gt;0 || <span class="reserved">this</span>.open) <span class="reserved">this</span>.expand();
}

<span class="comment">/**********************************************/</span>
<span class="comment">/*
	Arrow Key Event
*/</span>
<span class="comment">/**********************************************/</span>

treeItem.<span class="reserved">prototype</span>.getFirstChild = <span class="reserved">function</span>()
{
	<span class="reserved">if</span>(<span class="reserved">this</span>.childNodes.length&gt;0 &amp;&amp; <span class="reserved">this</span>.open)
		<span class="reserved">return</span> <span class="reserved">this</span>.childNodes[0];
	<span class="reserved">return</span> <span class="reserved">this</span>;
}

treeItem.<span class="reserved">prototype</span>.getLastChild = <span class="reserved">function</span>()
{
	<span class="reserved">if</span>(<span class="reserved">this</span>.childNodes.length&gt;0 &amp;&amp; <span class="reserved">this</span>.open)
		<span class="reserved">return</span> <span class="reserved">this</span>.childNodes[<span class="reserved">this</span>.childNodes.length-1].getLastChild();
	<span class="reserved">return</span> <span class="reserved">this</span>;
}

treeItem.<span class="reserved">prototype</span>.getPreviousSibling = <span class="reserved">function</span>()
{
	<span class="reserved">if</span>(!<span class="reserved">this</span>.parent) <span class="reserved">return</span> null;
	<span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.parent.childNodes.length;i++)
		<span class="reserved">if</span>(<span class="reserved">this</span>.parent.childNodes[i] == <span class="reserved">this</span>)break;
	<span class="reserved">if</span>(i == 0) 
		<span class="reserved">return</span> <span class="reserved">this</span>.parent;
	<span class="reserved">else</span>
		<span class="reserved">return</span> <span class="reserved">this</span>.parent.childNodes[i-1].getLastChild();
}

treeItem.<span class="reserved">prototype</span>.getNextSibling = <span class="reserved">function</span>()
{
	<span class="reserved">if</span>(!<span class="reserved">this</span>.parent) <span class="reserved">return</span> null;
	<span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.parent.childNodes.length;i++)
		<span class="reserved">if</span>(<span class="reserved">this</span>.parent.childNodes[i] == <span class="reserved">this</span>)break;
	<span class="reserved">if</span>(i == <span class="reserved">this</span>.parent.childNodes.length-1)
		<span class="reserved">return</span> <span class="reserved">this</span>.parent.getNextSibling();
	<span class="reserved">else</span>
		<span class="reserved">return</span> <span class="reserved">this</span>.parent.childNodes[i+1];
}

treeItem.<span class="reserved">prototype</span>.KeyDown=<span class="reserved">function</span>(e){
	var code,o;
	<span class="reserved">if</span>(!e) e = window.event;
	code = e.which ? e.which : e.keyCode;
	o = <span class="reserved">this</span>;
	<span class="reserved">if</span>(code == 37)
	{
		<span class="reserved">if</span>(o.open) o.collapse();
		<span class="reserved">else</span>
		{
			<span class="reserved">if</span>(o.parent) o.parent.select();
		}
		<span class="reserved">return</span> false;
	}
	<span class="reserved">else</span> <span class="reserved">if</span>(code == 38)
	{
		var tmp = o.getPreviousSibling();
		<span class="reserved">if</span>(tmp) tmp.select();
		<span class="reserved">return</span> false;
	}
	<span class="reserved">else</span> <span class="reserved">if</span>(code == 39)
	{
		<span class="reserved">if</span>(o.childNodes.length&gt;0)
		{
			<span class="reserved">if</span>(!o.open) o.expand();
			<span class="reserved">else</span>
			{
				var tmp = o.getFirstChild();
				<span class="reserved">if</span>(tmp) tmp.select();
			}
		}
		<span class="reserved">return</span> false;
	}
	<span class="reserved">else</span> <span class="reserved">if</span>(code == 40)
	{
		<span class="reserved">if</span>(o.open&amp;&amp;o.childNodes.length&gt;0)o.getFirstChild().select();
		<span class="reserved">else</span>
		{
			var tmp = o.getNextSibling();
			<span class="reserved">if</span>(tmp) tmp.select();
		}
		<span class="reserved">return</span> false;
	}
	<span class="reserved">else</span> <span class="reserved">if</span>(code == 13)
	{
		o.toggle();
		o.openURL();
		<span class="reserved">return</span> false;
	}
	<span class="reserved">return</span> true;
}
<span class="comment">/*****************************************************/</span>
Array.<span class="reserved">prototype</span>.indexOf=<span class="reserved">function</span>(o){
	<span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.length;i++)
		<span class="reserved">if</span>(<span class="reserved">this</span>[i]==o)<span class="reserved">return</span> i;
	<span class="reserved">return</span> -1;
}

Array.<span class="reserved">prototype</span>.removeAt=<span class="reserved">function</span>(i){
	<span class="reserved">return</span> <span class="reserved">this</span>.slice(0,i).concat(<span class="reserved">this</span>.slice(i+1))
}

Array.<span class="reserved">prototype</span>._remove=<span class="reserved">function</span>(o){
	var i=<span class="reserved">this</span>.indexOf(o);
	<span class="reserved">if</span>(i!= -1) <span class="reserved">return</span> <span class="reserved">this</span>.removeAt(i)
	<span class="reserved">return</span> <span class="reserved">this</span>
}
<span class="comment">/*****************************************************/</span>

<span class="comment">/*****************************************************/</span>
<span class="comment">/*
	xtreeItem Class
*/</span>
<span class="comment">/*****************************************************/</span>

<span class="reserved">function</span> xtreeItem(uid,text,action,target,title,Icon,xml){
	<span class="reserved">this</span>.uid=uid;
	<span class="reserved">this</span>.base=treeItem;
	<span class="reserved">this</span>.base(text,action,target,title,Icon);
	<span class="reserved">this</span>.Xml=xml;
}
xtreeItem.<span class="reserved">prototype</span>=new treeItem;

xtreeItem.<span class="reserved">prototype</span>.parseElement=<span class="reserved">function</span>(dom){
	<span class="reserved">return</span> dom.selectSingleNode(<span class="literal">"/TreeNode"</span>);
}

xtreeItem.<span class="reserved">prototype</span>.addNodesLoop = <span class="reserved">function</span>(oItem)
{
	<span class="reserved">for</span>(var i=0;i&lt;oItem.childNodes.length;i++)
	{
		var o = oItem.childNodes[i];
		var tmp = new xtreeItem(o.getAttribute(<span class="literal">"id"</span>),o.getAttribute(<span class="literal">"text"</span>),o.getAttribute(<span class="literal">"href"</span>),o.getAttribute(<span class="literal">"target"</span>),o.getAttribute(<span class="literal">"title"</span>),o.getAttribute(<span class="literal">"icon"</span>),o.getAttribute(<span class="literal">'Xml'</span>));
		<span class="reserved">this</span>.add(tmp);
		<span class="reserved">if</span>(o.getAttribute(<span class="literal">"Xml"</span>)) tmp.add(new treeItem(<span class="literal">"Loading..."</span>));
		<span class="reserved">else</span>
		{
			tmp.load=true;
			tmp.addNodesLoop(o);
		}
	}
}

xtreeItem.<span class="reserved">prototype</span>.loadChildren=<span class="reserved">function</span>()
{
	var oItem = <span class="reserved">this</span>;
	var oLoad = oItem.childNodes[0];
	var XmlHttp = new ActiveXObject(<span class="literal">"Microsoft.XMLHTTP"</span>);
	XmlHttp.onreadystatechange=<span class="reserved">function</span>(){
		<span class="reserved">if</span>(XmlHttp.readyState==4){
			<span class="reserved">if</span>(XmlHttp.status==200){
				<span class="reserved">if</span>(XmlHttp.responseXML.xml == <span class="literal">""</span>){ oLoad.setText(<span class="literal">"unavaible1"</span>);<span class="reserved">return</span>;}
				var XmlItem=oItem.parseElement(XmlHttp.responseXML.documentElement);
				<span class="reserved">if</span>(XmlItem.childNodes.length == 0){ oLoad.setText(<span class="literal">"unavaible"</span>) }
				<span class="reserved">else</span>
				{
					oItem.addNodesLoop(XmlItem);
					<span class="reserved">for</span>(var i=0;i&lt;oItem.childNodes.length;i++)
					{
						
						<span class="reserved">if</span>(parseInt(getCookie(<span class="literal">"item"</span>+oItem.childNodes[i].id)) ==1)
						{ oItem.childNodes[i].expand();}
					}
					<span class="reserved">if</span>(Global.selectedItem == oItem.childNodes[0])oItem.select();
					oLoad.remove();
				}
			}
			<span class="reserved">else</span>{
				oLoad.setText(<span class="literal">"unavaible"</span>);
			}
			XmlHttp = null;
			oItem.select(1);
		}
	}
	try{
		XmlHttp.open(<span class="literal">"get"</span>,<span class="reserved">this</span>.Xml+(/\?/g.test(<span class="reserved">this</span>.Xml)?<span class="literal">"&amp;"</span>:<span class="literal">"?"</span>)+<span class="literal">"temp="</span>+Math.random(),true);
		XmlHttp.send();
	}catch(e){ oLoad.setText(<span class="literal">"unavaible"</span>);}
}
xtreeItem.<span class="reserved">prototype</span>.setup=<span class="reserved">function</span>(oTarget){
	<span class="reserved">this</span>.add(new treeItem(<span class="literal">"Loading..."</span>));
	var temp=<span class="reserved">this</span>.toString();
	
	oTarget.appendChild(temp);
	<span class="reserved">this</span>.setuped=true;
	<span class="reserved">if</span>(<span class="reserved">this</span>.childNodes.length&gt;0 || <span class="reserved">this</span>.open) <span class="reserved">this</span>.expand();
}
<span class="comment">/*****************************************************/</span>
<span class="reserved">function</span> setCookie(name,value)
{
    var Days = 7; 
    var exp  = new Date();
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
    document.cookie = name + <span class="literal">"="</span>+ escape (value) + <span class="literal">";expires="</span> + exp.toGMTString();
}
<span class="reserved">function</span> getCookie(name)
{
    var arr = document.cookie.match(new RegExp(<span class="literal">"(^| )"</span>+name+<span class="literal">"=([^;]*)(;|$)"</span>));
    <span class="reserved">if</span>(arr != null) <span class="reserved">return</span> unescape(arr[2]); <span class="reserved">return</span> null;
}
<span class="reserved">function</span> delCookie(name)
{
    var exp = new Date();
    exp.setTime(exp.getTime() - 1);
    var cval=getCookie(name);
    <span class="reserved">if</span>(cval!=null) document.cookie= name + <span class="literal">"="</span>+cval+<span class="literal">";expires="</span>+exp.toGMTString();
}</pre>
	<hr>



<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<font size="-1">

</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Wed Aug  1 15:38:25 2007</div>
</body>
</html>
